import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class BotonAyuda here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class BotonAyuda extends Boton
{
    /**
     * Act - do whatever the BotonAyuda wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     */
    /**
     * Constructor
     */
    public BotonAyuda()
    {
        GreenfootImage imagen= new GreenfootImage("HELP.png");
        setImage(imagen);
    }
    /**
     * Revisa si se presiono el boton y te cambia la imagen mostrandote la ayuda
     */
    public void act() 
    {
         if(Greenfoot.mouseClicked(this) )
         {
            Greenfoot.playSound("click.mp3");
            MoveWorld mundo = (MoveWorld)this.getWorld();
            mundo.setActivaScroll(false);
            mundo.setBackground("ayuda.jpg");
            mundo.removeObjects(mundo.getObjects(Boton.class));
            mundo.addObject(new Atras(),50,35);
        }
    }    
}
